package com.sixth.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sixth.entity.Course;
import com.sixth.entity.Subject;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Component
public interface SubjectDao extends BaseMapper<Subject> {

    //int updateStatus(@Param("id")String id,@Param("statusId") String statusId,@Param("parentId") String parentId);

   // int updateStatusID(@Param("id")String id,@Param("statusId") String statusId);

    int insertSubject( @Param("id") String id, @Param("parentId") String parentId, @Param("title") String title, @Param("remark") String remark, @Param("date")Date date,@Param("date1")Date date1);

    @Update("update edu_subject set title=#{title},remark=#{remark} where id=#{id}")
    int updatesubject(@Param("id") String id, @Param("title") String title, @Param("remark")String remark);

    //查询全部
    List<Subject> findSubject(@Param("title") String title, @Param("statusId")  String statusId);

    //修改状态
    int updateByparentId(@Param("id")String id);


}